<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue鼠标事件(阻止默认事件)</title>
    <style type="text/css">
        #div-1 {
            width: 300px;
            height: 300px;
            line-height: 300px;
            background-color: #f7e1b5;
        }

        li, a {
            list-style: none;
            font-size: 40px;
            font-family: 隶书;
            text-decoration: none;
            float: left;
        }

        #div-1 > li {
            text-align: center;
        }

        #div-1 > li > a:hover {
            color: red;
        }
    </style>
    <script src="../js/vue.js"></script>
</head>
<body>
<div id="vue-3—top">
    <div id="div-1" @click="click1()">
        <li><a href="https://www.baidu.com" @click.stop="write()">跳转</a></li>
        <li><a href="https://www.baidu.com" @click.prevent.stop="write()">百度</a></li>
    </div>


</div>
</body>
<script type="text/javascript">
    let vm = new Vue({
        el: '#vue-3—top',
        data: {},
        methods: {
            click1() {
                alert('阻止成功');
                console.log('一被点击了');
            }
        }
    });
</script>
</html>